/*
 * TextFileParser.h
 *
 *  Created on: Dec 4, 2014
 *      Authors: Avihay Avitan & Stefan Farcas
 */
#include "../FileFormat/IFileFormat.h"
#include <string>
#include <vector>
#include <stdio.h>
#include <unistd.h>
#include <iostream>
#include <fstream>
#include <regex>

#ifndef ITEXTFILEPARSER_H_
#define ITEXTFILEPARSER_H_
using namespace std;

namespace TextFileParserSpace {
/**
 * ITextFileParser - defines the interface for implementing a parser of text file
 */
class ITextFileParser {

public:
	ITextFileParser();
	virtual ~ITextFileParser();
	/**
	 * setTextFileToParse - sets the file to be parsed, should receive the full paht of the ile
	 * fileNameWithFullPath - full path of the required file to be parsed
	 */
	virtual bool setTextFileToParse(string fileNameWithFullPath) = 0;
	/**
	 * setFileTextFormat - sets the IFileFormat object- the format of the required text file to be parsed
	 * fileFormat - pointer to IFileFormat object
	 */
	virtual bool setFileTextFormat(IFileFormat * fileFormat)=0;
	/**
	 * parseFile - the method to technically parsing the file
	 * should return true if parsed successfully
	 */
	virtual bool parseFile() = 0;

protected:
	ifstream parsingFile;
};

} /* namespace TextFileParserSpace */

#endif /* TEXTFILEPARSER_H_ */
